package cn.example.vip.mall.seckill.mapper;

import cn.example.vip.mall.seckill.entity.SeckillActivity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SeckillActivityMapper extends BaseMapper<SeckillActivity> {
	
	/**
	 * 获取有效的活动列表
	 */
	@Select("SELECT * FROM seckill_activity WHERE end_time > NOW() ORDER BY start_time ASC LIMIT 5")
	List<SeckillActivity> validActivity();

}
